home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: ImgBox.ie 1.002 (29.04.96) © Simone Tellini
- **
- **
- ** FUNCTION:
- ** Add a Bevel Box around an image
- **
- ** $HISTORY:
- **
- ** 29 Apr 1996 : 001.002 : Now it uses rexxreqtools.library, if possible
- ** 25 Apr 1996 : 001.001 : The user can select the bevel type so it will be
- ** rendered better! by Gian Maria Calzolari
- ** ?? ??? 1995 : 001.000 : First version
- **
- */
-
- OPTIONS RESULTS
-
- SIGNAL ON ERROR
-
- ADDRESS 'IEDITOR.1'
-
- call addlib("rexxreqtools.library", 0, -30, 0)
-
- UseLib = 0
-
- if show( L, "rexxreqtools.library" ) then UseLib = 1
-
- 'GETIMAGE'
- if RC = 5 then exit /* user aborted */
-
- 'GETIMAGEATTR' result img
-
- if UseLib then do
-
- call rtezrequest( 'Choose the Bevel Type:', '_Button|_Ridge|Icon _DropBox',, 'rt_pubscrname = "IEditor.1" rt_reqpos = reqpos_centerscr' )
-
- BoxType = rtresult
-
- if BoxType == 0 then BoxType = 3
-
- end
- else do
- /* close standard I/O channels (if IE started from CLI, this lets
- the output to be redirected where I want) */
-
- call close 'STDOUT'
- call close 'STDIN'
-
- /* open a window for dos I/O on IEditor's screen */
-
- call open 'STDOUT','CON:100/10/510/200/Add a Bevel Box around an image/SCREEN IEDITOR.1'
- call pragma '*','STDOUT'
- call open 'STDIN','*'
-
- /* ask the type */
-
- say 'Bevel type (1=Button, 2=Ridge, 3=iconDropBox)'
- parse pull BoxType
-
- /* close the window */
-
- call close 'STDIN'
- call close 'STDOUT'
- end
-
- select
- when BoxType = 1 then
- 'ADDBOX' img.leftedge-2 img.topedge-1 img.width+4 img.height+2 BoxType
- when BoxType = 2 then
- 'ADDBOX' img.leftedge-4 img.topedge-2 img.width+8 img.height+4 BoxType
- when BoxType = 3 then
- 'ADDBOX' img.leftedge-6 img.topedge-3 img.width+12 img.height+6 BoxType
- end
-
- EXIT
-
-
- ERROR:
-
- say 'Error "'|| RC ||'"on line' SIGL
-
- EXIT RC
-